#ifndef SQLITEDAOFACTORY_H_
#define SQLITEDAOFACTORY_H_

#include "SQLiteUserDAO.h"
#include "SQLiteGenreDAO.h"
#include "SQLiteContentDAO.h"
#include "SQLitePreferenceDAO.h"

#include "../DAOFactory.h"
#include "../../../util/Configuration.h"

#include <sqlite3.h>
#include <fstream>

class SQLiteDAOFactory: public DAOFactory {
private:
	static SQLiteDAOFactory* instance;

	SQLiteUserDAO* userDAO;
	SQLiteGenreDAO* genreDAO;
	SQLiteContentDAO* contentDAO;
	SQLitePreferenceDAO* preferenceDAO;

	sqlite3* database;

	SQLiteDAOFactory();
public:
	~SQLiteDAOFactory();
	static SQLiteDAOFactory* getInstance();

	virtual void create_db();
	virtual void connect_db();
	virtual void disconnect_db();
	virtual inline UserDAO* getUserDAO();
	virtual inline GenreDAO* getGenreDAO();
	virtual inline ContentDAO* getContentDAO();
	virtual inline PreferenceDAO* getPreferenceDAO();
};

#endif /* SQLITEDAOFACTORY_H_ */
